package com.example.tests;

public class ContactData implements Comparable<ContactData>{
	public String fname;
	public String lname;
	public String address1;
	public String homeNumber;
	public String mobileNumber;
	public String workNumber;
	public String mail1;
	public String mail2;
	public String dayOfBirth;
	public String monthOfBirth;
	public String yearOfBirth;
	public String address2;
	public String phone2;

	public ContactData() {

	}
	
	public ContactData(String fname, String lname, String address1,
			String homeNumber, String mobileNumber, String workNumber, String mail1,
			String mail2, String dayOfBirth, String monthOfBirth,
			String yearOfBirth, String address2, String phone2) {
		this.fname = fname;
		this.lname = lname;
		this.address1 = address1;
		this.homeNumber = homeNumber;
		this.mobileNumber = mobileNumber;
		this.workNumber = workNumber;
		this.mail1 = mail1;
		this.mail2 = mail2;
		this.dayOfBirth = dayOfBirth;
		this.monthOfBirth = monthOfBirth;
		this.yearOfBirth = yearOfBirth;
		this.address2 = address2;
		this.phone2 = phone2;
	}
	
	@Override
	public String toString() {
		return "ContactData [fname=" + fname + "]";
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
//		result = prime * result + ((fname == null) ? 0 : fname.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		ContactData other = (ContactData) obj;
		if (fname == null) {
			if (other.fname != null)
				return false;
		} else if (!fname.equals(other.fname))
			return false;
		return true;
	}

	@Override
	public int compareTo(ContactData other) {
		return this.fname.toLowerCase().compareTo(other.fname.toLowerCase());
	}
	
	
	
}